﻿using System;
using RpcHelper;
using Wedonek.RpcStore.Service.DAL;
using Wedonek.RpcStore.Service.Interface;
using Wedonek.RpcStore.Service.Model;

namespace Wedonek.RpcStore.Service.Collect
{
        internal class ContainerCollect : BasicCollect<ContainerDAL>, IContainerCollect
        {
                public ContainerDatum Get (Guid id)
                {
                        ContainerDatum datum = this.BasicDAL.Get (id);
                        if (datum == null)
                        {
                                throw new ErrorException ("rpc.container.not.find");
                        }
                        return datum;
                }

                public BasicContainer[] Gets (Guid[] ids)
                {
                        return this.BasicDAL.Gets (ids);
                }


                public void SetRemark (Guid id, string remark)
                {
                        this.BasicDAL.SetRemark (id, remark);
                }
        }
}
